#!/bin/bash
function s1_hello() {
        echo "hello,world"
}
function s2_tell_who_i_am(){
	whoami
}
function s3_which_distro_do_i_use(){
	if [ -f /etc/os-release ]; then
		source /etc/os-release
		echo "NAME=\"$NAME\""
	elif [ -f /etc/lsb-release ]; then
		source /etc/lsb-release
		echo "NAME=\"$DISTRIB_DESCRIPTION\""
	else
		echo "NAME=\"Unknown Linux Distribution\""
	fi
}
function s4_view_my_cpu_arch(){
	arch=$(uname -m)
	if [ "$arch" == "x86_64" ]; then
		echo "x86_64"
	elif [ "$arch" == "i386" ] || ["$arch"=="i686"]; then
		echo "x86_32"
	else
		echo "$arch"
	fi
}
function s5_show_first_scsi_disk_size(){
      size=$(lsblk -b -d -o NAME,SIZE |grep '^sda' | awk '{print $2}')
      if [ -n "$size" ]; then
	      gb_size=$((size / 1024 / 1024 / 1024))
	     echo "$gb_size"
     else
	    echo "0"
      fi
} 
function s6_show_main_memory_size_in_megabytes(){
	free -m | awk 'Mem:/ {print $2}'
}

